class Solution(object):
    def isValid(self, s):
        if not s:
            return True
        t = s.split('abc')
        next_s = ''.join(t)
        if s == next_s:
            return False
        else:
            return self.isValid(next_s)



data = Solution()
s = "aabcbc"
print(data.isValid(s))